package bishi.day18_5_14;

import java.util.*;

/**
 * @author 是阿秋啊
 * @date 2022/05/15 12:50
 **/
public class tu_zi {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            if (n <= 2) {
                System.out.println(1);
                continue;
            }
            int a = 1;
            int b = 1;
            while (n > 2) {
                int c = a + b;
                b = a;
                a = c;
                n--;
            }
            System.out.println(a);
        }
    }
}